#ifndef RESSOURCE_MANAGER_HPP
#define RESSOURCE_MANAGER_HPP

#include <iostream>
#include <map>
#include "ImageRessource.hpp"
#include "FontRessource.hpp"
#include "MusicRessource.hpp"
#include "SoundRessource.hpp"

class RessourceManager
{
public:
	RessourceManager();
	virtual ~RessourceManager();

	///////////////////////
	//// Add Resources ////

	// Add Image Resource
	ImageRessource* AddImage(const std::string nameID, const std::string filename = "");

	// Add Font Resource
	FontRessource* AddFont(const std::string nameID, const std::string filename = "");

	// Add Music Resource
	MusicRessource* AddMusic(const std::string nameID, const std::string filename = "");

	// Add Sound Resource
	SoundRessource* AddSound(const std::string nameID, const std::string filename = "");


	//////////////////////
	////  Ressource   ////

	// Image Ressource
	ImageRessource* Image(const std::string nameID);

	// Font Resource
	FontRessource* Font(const std::string nameID);

	// Music Resource
	MusicRessource* Music(const std::string nameID);

	// Sound Resource
	SoundRessource* Sound(const std::string nameID);


	//////////////////////////
	//// Unload Ressource ////

	// Unload Image Resource
	void UnloadImage(const std::string nameID);

	// Unload Font Resource
	void UnloadFont(const std::string nameID);

	// Unload Music Resource
	void UnloadMusic(const std::string nameID);

	// Unload Sound Resource
	void UnloadSound(const std::string nameID);


	////////////////////////
	/// Delete Resources ///

	// Delete All Images Resources
	void DeleteImages();

	// Delete All Fonts Resources
	void DeleteFonts();

	// Delete All Music Resources
	void DeleteMusic();

	// Delete All Sounds Resources
	void DeleteSounds();

	///////////////
	// Find NameID

	// Find NameID of Image by filename
	const std::string ImageNameID(const std::string filename);

	// Find NameID of Font by filename
	const std::string FontNameID(const std::string filename);

	// Find NameID of Music by filename
	const std::string MusicNameID(const std::string filename);

	// Find NameID of Sound by filename
	const std::string SoundNameID(const std::string filename);

private:
	std::map<const std::string, ImageRessource*> m_images;
	std::map<const std::string, FontRessource*> m_fonts;
	std::map<const std::string, MusicRessource*> m_music;
	std::map<const std::string, SoundRessource*> m_sounds;



};



#endif
